package com.errol.batchprocessor.batchprocessor.payload;

import lombok.Getter;

/**
 * 批处理模型 单条数据载体抽象类
 *
 * @author zhang xiao bin
 * @version v1.0
 * @date 2021/02/22
 * @since v5.0.5
 **/
@Getter
public abstract class AbstractSinglePayload<SE> {

    private final SE singleEntity;
    /**
     * 编辑模式时的原记录，但不要求编辑时一定有该值
     */
    private SE oldSingleEntity;

    public AbstractSinglePayload(SE singleEntity) {
        this.singleEntity = singleEntity;
    }

    public void setOldSingleEntity(SE oldSingleEntity) {
        this.oldSingleEntity = oldSingleEntity;
    }
}
